<?php include TMPL_PATH.'public/header.phtml';?>
<link rel="stylesheet" type="text/css" href="/statics/js/calendar/jscal2.css"/>
<link rel="stylesheet" type="text/css" href="/statics/js/calendar/border-radius.css"/>
<link rel="stylesheet" type="text/css" href="/statics/js/calendar/win2k.css"/>
<script type="text/javascript" src="/statics/js/calendar/calendar.js"></script>
<script type="text/javascript" src="/statics/js/calendar/lang/zh-cn.js"></script>
<div class="subnav">
    <div class="content-menu ib-a blue line-x">
    	<div style="float:left;margin-right:10px;">
        <a href='javascript:;' class="on"><em>租赁预约列表</em></a>
      </div>
    	<div style="color:#000;">
    		<form name="searchform" action="__SELF__"  method="post">
    		<input type="hidden" value="1" name="search">
    		
				预约人姓名 <input type="text" class="input-text" name="name" >&nbsp;&nbsp;
				预约人手机号 <input type="text" class="input-text" name="phone">&nbsp;
				预约时间 <input type="text" class="input-text" name="start_time" id="start_time">--
				<script type="text/javascript">
			Calendar.setup({
			weekNumbers: false,
		    inputField : "start_time",
		    trigger    : "start_time",
		    dateFormat: "%Y-%m-%d",
		    showTime: false,
		    minuteStep: 1,
		    onSelect   : function() {this.hide();}
			});
        </script>
				 <input type="text" class="input-text" name="end_time" id="end_time">
				<script type="text/javascript">
			Calendar.setup({
			weekNumbers: false,
		    inputField : "end_time",
		    trigger    : "end_time",
		    dateFormat: "%Y-%m-%d",
		    showTime: false,
		    minuteStep: 1,
		    onSelect   : function() {this.hide();}
			});
        </script>
				<input type="submit" value="搜索" class="button" name="search">
    		</form>
    	</div>
    </div>
</div>
<div class="bk"></div>
<div class="pad_10">
<div class="table-list">
<form action="<?php echo U('tenancy/info_delete');?>" method="post">
    <table width="100%" cellspacing="0" >
        <thead>
            <tr>
            <th width="38">选择</th>
            <th align='center' width="100">姓名</th>
            <th align='left'>手机号</th>
            <th align='center' width="150">预约时间</th>
            <th align='center' width="100">状态</th>
			<th>管理操作</th>
            </tr>
        </thead>
    <tbody>
    <?php 
   	if(isset($tenList) && $tenList):
   		foreach ($tenList as $v):
   ?>
			<tr>
					<td align='center'><input name="ids[]" type="checkbox" value="<?php echo $v['id']?>" /></td>
					<td align='center'><?php echo $v['name']?></td>
					<td><?php echo $v['phone']?></td>
					<td align='center'><?php echo date('Y-m-d H:i:s', $v['sub_time']);?></td>
					<td align='center'><?php if($v['statue']==1){ echo "<font color='red'>"; } echo $statues[$v['statue']];if($v['statue']==1){ echo "</font>"; }?></td>
					<td align='center'> 
					<a href="<?php echo U('tenancy/info_edit', 'id='.$v['id']);?>">操作</a> | 
					<a href="javascript:confirmurl('<?php echo U('tenancy/info_delete', 'id='.$v['id']);?>','确认要删除 该预约信息 吗？')">删除</a>
					</td>
				</tr>
	<?php 
		endforeach;
		endif;
	?>
   </tbody>
    </table>
   <div class="btn"><input type="checkbox" value="" id="check_box" onclick="selectall('ids[]');">全选/取消 <input type="submit" class="button" name="dosubmit" value="删除"/></div>
</form>
<div id="pages"><?php echo $pageShow;?></div>
</div>
</div>
</body>
</html>
